﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KhachSan.Process.Private.Tien.Usercontrol
{
    public partial class ucMenu : UserControl
    {
        private Panel pCenter;
        private Panel pBack;
        private Label lblKS;
        private Panel pPic;
        
        public ucMenu()
        {
            InitializeComponent();
        }
        public ucMenu(Panel panel1,Panel panel2,Label lblKS,Panel pPic)
        {
            InitializeComponent();
            this.pCenter = panel1;
            this.pBack = panel2;
            this.lblKS = lblKS;
            this.pPic = pPic;
            //for (int i = 0; i < tileControl1.Groups.Count; i++)
            //{
            //    for (int j = 0; j < tileControl1.Groups[i].Items.Count; j++)
            //    {
            //        if(tileControl1.Groups[i].Items[j].Text != "Lễ tân")
            //        tileControl1.Groups[i].Items[j].Enabled = false;

            //    }
            //}
        }

        private void tileLeTan_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            lblKS.Visible = false;
            pBack.Visible = true;
            pPic.Visible = false;
            ThuVien.Go(this, new ucNVLeTan(pCenter), pCenter);
        }

        private void tilePhong_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            lblKS.Visible = false;
            pBack.Visible = true;
            pPic.Visible = false;
            ThuVien.Go(this,new ucNVPhong(pCenter,pBack), pCenter);
        }

        private void tileKho_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            lblKS.Visible = false;
            pBack.Visible = true;
            pPic.Visible = false;
            ThuVien.Go(this, new ucNVKho(pCenter, pBack), pCenter);
        }

        private void tileNhaHang_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            lblKS.Visible = false;
            pBack.Visible = true;
            pPic.Visible = false;
            ThuVien.Go(this, new ucNVNhaHang(pCenter, pBack), pCenter);
        }

        private void tileKhach_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            lblKS.Visible = false;
            pBack.Visible = true;
            pPic.Visible = false;
            ThuVien.Go(this, new ucThongTinKhach(pCenter, pBack), pCenter);
        }
    }
}
